package com.shop.www.service;

import com.shop.www.dao.userDAO;
import com.shop.www.dao.userDAOImpl;
import com.shop.www.daoX.UserDAO;
import com.shop.www.daoX.UserDAOImpl;
import com.shop.www.po.user;
import com.shop.www.view.ViewBaseServlet;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

import static com.shop.www.Utils.orempty.notempty;

    @WebServlet("/genshin")
 public class genshin extends ViewBaseServlet {
    UserDAO userdao = new UserDAOImpl();
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        String id = request.getParameter("fid");
        if (notempty(id)){
            int roleid = Integer.parseInt(id);
            user role = userdao.getusermess(roleid);
            request.setAttribute("role",role);
            super.processTemplate("genshin",request,response);


        }
    }
}
